<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>    
    <body>
        <s:form namespace="/AssessmentManagement" action="viewAssessment_%{moduleId}">
            <table border="1">
                <tr>
                    <th>Assessment ID</th>
                    <th>Title</th>  
                    <th>Description</th>
                    <th>Maximum Mark</th>
                    <th>Mark Range (Max)</th>
                    <th>Mark Range (Min)</th>
                    <th>Module</th>
                    <th>Weight Percentage</th>
                    <th>&nbsp;</th>
                </tr>
                <s:iterator value="assessmentList">
                    <tr>
                        <td><s:property value="assessmentId"/></td>
                        <td><s:property value="title"/></td>
                        <td><s:property value="description"/></td>
                        <td><s:property value="maxMark"/></td>
                        <td><s:property value="markRange.max"/></td>
                        <td><s:property value="markRange.min"/></td>
                        <td><s:property value="module.name"/></td>
                        <td><s:property value="weightPercentage"/></td>
                        <td>
                            <s:url  namespace="/AssessmentManagement" action="viewAssessment" var="myUrl" >
                                <s:param name="assessmentId" value="assessmentId"/>
                            </s:url>
                            <a href='<s:property value="#myUrl"/>'>Details</a>                      
                        </td>
                    </tr>
                </s:iterator>


            </table>
        </s:form>
    </body>
</html>
